using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 子弹预设所挂的脚本
/// </summary>
public class BulletPrefabs : MonoBehaviour
{
    /// <summary>
    /// 子弹的飞行速度
    /// </summary>
    public float speed;

    /// <summary>
    /// 子弹的位置
    /// </summary>
    public float pos
    {
        get { return transform.position.y; }
        private set { }
    }

    public bool isRun = true;
    private void Update()
    {
        if (isRun)
        {
            transform.Translate(0, -speed * Time.deltaTime, 0);
        }
    }
}